package com.flyou.ccnucenter;

import android.app.Application;

import com.facebook.drawee.backends.pipeline.Fresco;
import com.flyou.ccnucenter.ui.activity.MainActivity;
import com.flyou.ccnucenter.utils.okhttp.OkHttpClientManager;

import java.util.concurrent.TimeUnit;

import cat.ereza.customactivityoncrash.CustomActivityOnCrash;

/**
 * ============================================================
 * 项目名称：HenuCenterPro
 * 包名称：com.flyou.flying
 * 文件名：MyApplication
 * 类描述：
 * 创建人：flyou
 * 邮箱：fangjaylong@gmail.com
 * 创建时间：2015/9/28 17:20
 * 修改备注：
 * 版本：@version  V1.0
 * ============================================================
 */
public class MyApplication extends Application {
    @Override
    public void onCreate() {
        CustomActivityOnCrash.setLaunchErrorActivityWhenInBackground(false);
        CustomActivityOnCrash.setRestartActivityClass(MainActivity.class);
        CustomActivityOnCrash.setShowErrorDetails(true);
        CustomActivityOnCrash.setEnableAppRestart(true);
        CustomActivityOnCrash.setDefaultErrorActivityDrawable(R.mipmap.ic_launcher);
        CustomActivityOnCrash.install(this);
        OkHttpClientManager.getInstance().getOkHttpClient().setConnectTimeout(100000, TimeUnit.MILLISECONDS);
        Fresco.initialize(this);
        super.onCreate();
    }
}
